﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using AForge.Imaging;

namespace Imaging
{
    public partial class HSBScale : Control
    {
        public HSBScale()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
            Pen pen = new Pen(Color.White);
         
            for (int x = 0; x < pe.ClipRectangle.Width; x++)
            {
                RGB rgb = new RGB();
                //FIXME: kivettem, mert nem fordult vele..
                //AForge.Imaging.ColorConverter.HSL2RGB(new HSL(360*x/pe.ClipRectangle.Width, 1.0, 0.5), rgb); 
                pen.Color = rgb.Color;
                pe.Graphics.DrawLine(pen, pe.ClipRectangle.Left + x, pe.ClipRectangle.Top, pe.ClipRectangle.Left + x, pe.ClipRectangle.Bottom);
            }
            pen.Dispose();
        }
    }
}
